<?php

namespace Core\Helper;

class ValidatorDto{



    /**
     * @var boolean
     */
    private $isValid;
    private $messageArr = array();

    function __construct($isValid, $messageArr = array())
    {
        $this->isValid = $isValid;
        $this->messageArr = $messageArr;
    }



    /**
     * @param mixed $isValid
     */
    public function setIsValid($isValid)
    {
        $this->isValid = $isValid;
    }

    /**
     * @return mixed
     */
    public function isValid()
    {
        return $this->isValid;
    }

    /**
     * @param array $messageArr
     */
    public function setMessageArr($messageArr)
    {
        $this->messageArr = $messageArr;
    }

    /**
     * @return array
     */
    public function getMessageArr()
    {
        return $this->messageArr;
    }


    public function getMessageStr()
    {
        $result= '';
        foreach ($this->getMessageArr() as $aMessage) {
            $result = $result.$aMessage.'<br>';
        }

        return $result;

    }


}